home *** CD-ROM | disk | FTP | other *** search
/ Unreal Tournament Game Programming for Teens / UnrealTournamentGameProgrammingForTeens.iso / Chapter Files / Chapter10 / DiscoBallC.txt next >
Encoding:
Text File  |  2006-11-02  |  669 b   |  32 lines

  1. //==============================================================
  2. // DiscoBallC.
  3. // see the code in DiscoBallC
  4. //==============================================================
  5. class DiscoBallC extends KActor placeable;
  6.  
  7.  
  8. // #1
  9. // Adjust the time to 6
  10. function PreBeginPlay() {
  11.    // # 1
  12.     SetTimer(6.0, true); 
  13. }
  14.  
  15.  
  16. function PostBeginPlay() {
  17.      // # 2
  18.      // Sets the initial velocity vector to point down 
  19.      // The speed of movement is 60 units
  20.      // The arguments defined x y and z coordinates
  21.      Velocity = vect(0, 0, -60);
  22. }
  23.  
  24.  
  25. function Timer() {
  26.     // # 3
  27.     // Flip the velocity vector around
  28.     Velocity = (-1) * Velocity;
  29. }
  30.  
  31.  
  32.